import React from 'react'

export default function FucComponent() {
   const [user,setUser]= React.useState({name:'安徽的的'})
    React.useEffect(()=>{
        return ()=>{
            console.log('组件卸载')
        }
    },[])
    function changeUser(){
        setUser({
            name:user.name==='安徽的的'?'安徽的':'安徽的的'
        })
    }
  return (
    <div>
      user:{user.name}
      <button onClick={changeUser}>changeUser</button>
    </div>
  )
}
